#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
using namespace std;

int main()
{
	int a,b;
	stringstream tempIO;
	string ans;
	cin>>a>>b;
	tempIO<<fixed<<setprecision(5)<<double(a)/b;
	tempIO>>ans;
	for(int i=0;i<ans.size();i++)
	{
		if(ans[i]!='.')
			ans[i]=char(ans[i]+'A'-'0');
	}
	cout<<ans<<endl;
	
}
